import { dataQueryAxios } from '@/utils/request'

//最新监测

export const getLatest_monitoringdata = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/companies/monitor',
    method: 'post',
    data
  })
}

//企业

export const alarm_recommend = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/companies/alarm_recommend',
    method: 'post',
    data
  })
}
//监测列表

export const monitorList = (data: any) => {
  return dataQueryAxios({
    url: data.id ? `/api/data-query/v1/companies/monitor/${data.id}` : `/api/data-query/v1/companies/monitor`,
    method: 'post',
    data
  })
}
//获取监测名单列表

export const monitorsList = (params: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/monitors/lists`,
    method: 'get',
    params
  })
}
//添加监测名单列表

export const addmonitorsList = (data: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/monitors/lists`,
    method: 'post',
    data
  })
}
//添加监测项

export const addmonitorsitems = (data: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/monitors/items`,
    method: 'post',
    data
  })
}
//查看是否监测项

export const has_datas = (data: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/monitors/items/has_datas`,
    method: 'post',
    data
  })
}
//获取热门赛道

export const hot_monitor_track = () => {
  return dataQueryAxios({
    url: `/api/data-query/v1/companies/hot_monitor_track`,
    method: 'post'
  })
}
//删除监控数据项

export const deletemonitors = (params: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/monitors/items/${params.data_id}`,
    method: 'delete',
    params
  })
}
